package com.changgou.page.lister;

import com.changgou.page.config.RabbitMQConfig;
import com.changgou.page.service.PageService;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GoodsLister {

    @Autowired
    private PageService pageService;

    @RabbitListener(queues =  RabbitMQConfig.GOODS_UP_QUEUE)
     public void receiveMessage(String spuId){
       pageService.generateItemPage(spuId);
    }
}
